<div align="left">
<ul id="cont-albumList" class="normal-list">
<!-- <li class="ui-state-default ui-corner-all">
	<a href="javscript:void(0)"><img src="/core.php/photo/thumbnail/id/6ea6a7503396afbdac1e28f496aedbb7/type/mini"/></a>
	<span><?php echo __("All photos");?></span>	
</li> -->


<?php 
$mainAlbumId = $mainAlbum->getAlbumId();
foreach($albums as $album)
{
	//TODO hacer en el catch que coja la siguiente foto hasta que haya una permitida o se acabe el album

	$frontId = "";
	try{
		$frontId= $album->getFront()->getPhotoId();
	}catch(Exception $e){
		
	}
?>
<li class="ui-state-default ui-corner-all" album="<?php echo $album->getAlbumId();?>">
	<a href="javascript:void(0)"><img src="/core.php/photo/thumbnail/id/<?php echo $frontId;?>/type/mini"/>
	<span><?php echo $album->getName();?></span>
	</a>
	<?php if($album->getAlbumId() != $mainAlbumId) {?><a href="javascript:void(0)" style="float:right;" class="ui-icon ui-icon-trash" title="Remove"></a> <?php }?>
	<a href="javascript:void(0)" style="float:right;" class="ui-icon ui-icon-gear" title="Edit"></a>

</li>
<?php 

}

 ?>
 
</ul>
<?php if($showButton){?>
<button id="but-newAlbum">Crear album</button>
<?php }?>
</div>

